bandersnatch
apparantly has code to run xmlrpc
server but I'm not able to use it, so I opened an issue. I also asked a question on SO.
Later I wrote a more formal discription of the problem I'm trying to solve and its approaches at https://docs.google.com/document/d/1eQ0SqlSyGPjt-82_yE21AbyBItUBpLReFN_w5Vwleu4/
I also wrote the download stats script using xmlrpc
service of PyPI